/*
 * @description 引入table组件配置文件
 */
import operate from '@/components/table-operate'
//扩展操作按钮
import expandOperate from './operate'
export const columnsData = [{
  type: 'selection',
  width: 48,
  align: 'center'
}, {
  title: '名称',
  key: 'categoryName'
}, {
  title: '编码',
  width: 220,
  key: 'categoryCode'
}, {
  title: 'ID',
  width: 220,
  key: 'categoryID'
}, {
  title: '创建者',
  width: 220,
  key: 'createUser'
}, {
  title: '操作',
  width: 140,
  className: 'iv-text-center',
  render (h, params) {
    return h(operate, {
      props: {
        item: params.row,
        index: params.index,
        isEdit: false
      },
      scopedSlots: {
        operate: props => h(expandOperate, {
          props: {
            item: params.row,
            index: params.index
          },
          class: {
            'iv-hover-color': true,
            'iv-main-color': true,
            'iv-pointer': true
          }
        })
      }
    })
  }
}]